#include<iostream>
using namespace std;

int main()
{
    int x;
    scanf("%d", &x);
    double n = 0.0000;
    if (x <= 150) n = 0.4463 * x;
    else if (x <= 400)
    {
        n += 0.4463 * 150;
        n += 0.4663 * (x-150);
    }
    else
    {
        n += 0.4463 * 150;
        n += 0.4663 * (400 - 150);
        n += 0.5663 * (x - 400);
    }
    printf("%.1lf", n);
    return 0;
}